﻿@using KPIS.GERP.Models.ICM
@using KPIS.GERP.Models.ICM.ViewModel
@model vmPrVsPo
 
@{
    // Layout = "~/Views/Shared/_EmptyLayout.cshtml";
    ViewBag.Title = "แก้ไขใบสั่งซื้อ/จ้าง [PO]";
    ViewBag.Descr = ViewBag.Title + " เพื่อแก้ไขใบสั่งซื้อ/จ้างโดยหน่วยงานพัสดุ";
}

@using (Html.BeginForm("Edit", "PurchaseOrder", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()

    <div class="block-button-menu-above">
        @Html.ButtonViewAll()
        @Html.ButtonSubmit()
    </div>
    
    @Html.ValidationSummary(true, KPIS.GERP.Models.Class.ValidateText.RequiredField, new { @class = "alert alert-error" })
    @Html.Partial("_EditorForm")
}

@section scripts
{
    <script>
        $("form").submit(function (e) {
            e.preventDefault();
            var currentForm = this;
            bootbox.confirm(function (result) {
                if (result) {
                    currentForm.submit();
                }
            });
        });

    </script>
}